//(x, y, sightRange, team, me);
var i, _x=argument0, _y=argument1, _sr=argument2, _t=argument3, _me=argument4;
for(i=0;i<instance_number(Guy);i+=1)
{
    ii = instance_find(Guy, i);
    if (ii.team != _t && ii != _me)
    {
        if (point_distance(_x, _y, ii.x, ii.y)<=_sr)
        {
            los = false;
            _me._tx = _x;
            _me._ty = _y;
            _me._ii = ii;
            with(_me)
            {
                omask = mask_index;
                mask_index = nosprite;
                if (!collision_line(_tx, _ty, _ii.x, _ii.y, Solid, false, true))
                {
                    other.los = true;
                }
                mask_index = omask;
            }
            if (los) return ii;
        }
    }
}
return noone;
